package com.example.leero.graduation.customView;

import android.app.ProgressDialog;
import android.content.Context;

import com.example.leero.graduation.R;


/**
 * Created by jiangwen on 2017/4/3.
 * hjiangwen1@163.com
 */

public class LoadingDialog extends ProgressDialog {
  private static LoadingDialog sLoadingDialog;

  public LoadingDialog(Context context) {
    super(context);
    setMessage("正在加载...");
  }

  public static LoadingDialog show(Context context) {
    sLoadingDialog = new LoadingDialog(context);
    sLoadingDialog.show();
    return sLoadingDialog;
  }

  public static void dismissDialog() {
    if (sLoadingDialog != null && sLoadingDialog.isShowing()) {
      sLoadingDialog.dismiss();
    }
  }

}
